<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas id="my-cancas"></canvas>
</body>
<script>
    let myCancas = document.getElementById('my-cancas');
    let ctx = myCancas.getContext('2d');
    // const ctx = document.getElementById('my-can').getContext('2d');
    ctx.save();
    ctx.translate(100, 100);
    ctx.arc(0,0,100,0, 30 * Math.PI / 180);
    ctx.restore();

    //第一条线
    ctx.save();
    ctx.moveTo(1000,100);
    ctx.lineTo(200,100);
    ctx.restore();
    //第二条线
    ctx.save();
    ctx.translate(500, 500);
    ctx.moveTo(0,0);
    ctx.rotate(30*Math.PI/180);
    ctx.lineTo(100,0);
    ctx.stroke();
    ctx.restore();
</script>
</html>